/*
 * @Author: Author && Email
 * @Date: 2024-03-15 22:42:18
 * @LastEditors: Author && Email
 * @LastEditTime: 2024-03-17 18:40:23
 * @FilePath: \MDK-ARMd:\WorkSpace\PRJ\Washing_machine\software\Washing_machine_V1\User\moudle\motor\motor_run.h
 * @Description: 
 * 
 * Copyright (c) 2024 by ${git_name_email}, All Rights Reserved. 
 */
#ifndef _MOTOR_RUN_H_
#define _MOTOR_RUN_H_
#include "bsp_include.h"

typedef struct{
    uint8_t running:1;          /* 运行 */
    uint8_t short_break:1;      /* 刹车 */
    uint8_t direction:1;        /* 方向 */
    uint8_t :5;
    uint32_t duty;              /* 输出占空比0-1000 */
}motor_t;

extern motor_t	g_motor_drain;	/* 排水电机 */
extern motor_t	g_motor_drum;	/* 注水电机 */

void motor_hard_init(void);
void motor_hard_task(void);

#endif /* _MOTOR_RUN_H_ */
